package ru.spies.requests;

import java.nio.charset.StandardCharsets;

public abstract class AbstractRequestWork {
		
	protected String getParamInUTF8(String param){
		byte[] bytes = param.getBytes(StandardCharsets.ISO_8859_1);
		return new String(bytes, StandardCharsets.UTF_8);	
	}
	
	protected String changeIfNull(String someValue){
		if (someValue.equals("null")) return null;
		if (someValue.equals("")) return null;
		if (someValue.equals(" ")) return null;
		return someValue;
	}
	
}
